﻿using System.Windows;
using System.Windows.Media;

namespace FAQ_UI
{
	public class UIDrawable : Drawable
	{
		private FrameworkElement child;

		public UIDrawable()
		{
		}

		public UIDrawable(FrameworkElement child)
		{
			setChild(child);
		}

		public void setChild(FrameworkElement child)
		{
			this.child = child;
			invalidateSelf();
		}

		public override void draw(DrawingContext canvas)
		{
		}

		public override FrameworkElement getChild()
		{
			return child;
		}

		protected override void onBoundsChange(Rect oldBounds, Rect newBounds)
		{
			child.Arrange(newBounds);
		}
	}
}